Better support for building on Windows #484
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know that you are not a Windows user and that you don't wish to provide support for source builds on Windows. However, I am a Windows user and have had to build mysqlclient from source because you do not provide wheels for 32-bit versions of Python (which I need for other reasons). I am hoping that you will accept this PR that should make it easier for users like me to be able to install mysqlclient from source without needing to clone this repo to edit site.cfg and setup_windows.py.
I know this cannot account for all possible setups, but at least with these changes it has a chance of building under some setups, which should be an improvement on the current defaults in setup_windows.py and site.cfg which I don't believe have any chance at building correctly. This PR includes 5 small improvements:
MYSQLCLIENT_CLIENT
andMYSQLCLIENT_CONNECTOR
so that someone who knows what they are doing can point the build script to their copy of the connector while installing from pip without needing to clone this repo to edit site.cfg.directory.
include
andlib
whereas building from source (like this repo's workflow does) leaves them ininclude/mariadb
andlib/mariadb
. I'm not sure why these differ, but it shouldn't be harmful to add both locations to the include/lib paths so that either works.I'm happy to break up these changes if you would like to accept some of them but not others. Also, while I can confirm that building against MySQL Connector/C 6.1 does still work, since it has not been updated in over 3 years and it seems like you do not build against it anymore, we could simplify things by removing support for it. We could go back to hardcoding the client library as mariadbclient if that were the only one we support and then there would just be a single site.cfg option and environment variable, and a single default directory.